package acceptanceTests.readingAmessage;

import junit.framework.TestCase;
import acceptanceTests.registration.RegistrationInt;
import acceptanceTests.registration.RegistrationProxy;

public class ReadingAmessageStoryTest extends TestCase {
//
	RegistrationInt _forumRegimp = new RegistrationProxy();
	ReadingAmessageInt _readMessage = new ReadingAmessageProxy(_forumRegimp.getServer());

	public ReadingAmessageStoryTest(String name) {
		super(name);
	}

	public void testLookUp(){

		_forumRegimp.register("user3" ,"abc@gmail.com","password");
		String tPath = _readMessage.getLegalPathToMessage();
		Object tMessage = _readMessage.goToMessage(tPath);
		assertEquals(tPath, _readMessage.getMessagePath(tMessage).toString());
		assertTrue(_readMessage.readMessage(tMessage,"user1"));
		_forumRegimp.deleteRegisterUser("user3");
		
	}

}
